package edu.scau.divineplace.controller;

import edu.scau.divineplace.config.global.log.WebLog;
import edu.scau.divineplace.entity.dos.MusicDiscListDO;
import edu.scau.divineplace.entity.vo.music.MusicDiscListVO;
import edu.scau.divineplace.service.MusicService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: x1aolone
 * @Date: 2020/12/11 15:47
 */
@Slf4j
@RestController
@CrossOrigin
@Api("Music控制器")
@WebLog("Music控制器")
@RequestMapping("/music")
public class MusicController {

    @Autowired
    private MusicService musicService;

    @ApiOperation("通过内容id获取音乐的disc列表")
    @GetMapping("/disc/list/{contentId}")
    public List<MusicDiscListVO> getDiscList(@PathVariable Long contentId){
        return musicService.getDiscList(contentId);
    }

}
